package com.example.restaurantclient.Activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.anshi.shopchangepro.MainActivity;
import com.example.restaurantclient.R;

public class QueueUpSuccessActivity extends AppCompatActivity {
    private TextView queueCancel;
    private TextView beforeBuy;
    private TextView saveImg;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_queue_up_success);
        queueCancel=findViewById(R.id.queue_up_cancel);
        beforeBuy=findViewById(R.id.before_buy);
        saveImg=findViewById(R.id.save);
        queueCancel.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //下划线
        queueCancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        beforeBuy.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
                startActivity(new Intent(QueueUpSuccessActivity.this, MainActivity.class));
            }
        });
        saveImg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(QueueUpSuccessActivity.this, "已成功保存！", Toast.LENGTH_SHORT).show();
            }
        });
    }
}
